package com.yuyou.tas.admin.vo.req;

import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Created by yujn.liu on 2018/1/22.
 */
public class ReqAuthUserAdd {

    @ApiModelProperty(value = "帐号", required = true)
    @Valid
    @NotBlank(message = "帐号(account)不能为空")
    private String account;

    @ApiModelProperty(value = "密码 md5 hash", required = true)
    @Valid
    @NotBlank(message = "密码(password)不能为空")
    private String password;

    @ApiModelProperty(value = "确认密码", required = true)
    @Valid
    @NotBlank(message="cPassword不能为空")
    private String cPassword;

    @ApiModelProperty(value = "姓名", required = true)
    @Length(max = 40 , message = "用户名长度不能超过40个字")
    @Valid
    @NotBlank(message = "姓名(username) 不能为空")
    private String username;

    @ApiModelProperty(value = "人员类型：1：教师 2：教研 3：教务", required = true)
    @Valid
    @NotNull(message = "人员类型 (type) 不能为空")
    private Integer type;

    @ApiModelProperty(value = "帐号角色ids", required = true)
    @Valid
    @NotEmpty(message = "帐号角色ids (authRoleIds) 不能为空")
    private List<Long> authRoleIds;

    @ApiModelProperty(value = "性别 0：男 1：女 2：未知", required = true)
    @Valid
    @NotNull(message = "性别 (sex) 不能为空")
    private Integer sex;

    @ApiModelProperty(value = "人员状态：0：在职，1：离职", required = true)
    @Valid
    @NotNull(message = "人员状态 (workStatus) 不能为空")
    private Integer workStatus;

    @ApiModelProperty(value = "任职状态：0：全职 1：兼职", required = true)
    @Valid
    @NotNull(message = "任职状态 (jobStatus) 不能为空")
    private Integer jobStatus;

    @ApiModelProperty(value = "校区权限:0:全部，1:部分", required = true)
    @Valid
    @NotNull(message = "校区权限(schoolType) 不能为空")
    private Integer schoolType;

    @ApiModelProperty(value = "科目学段")
//    @Valid
//    @NotEmpty(message = "科目学段 (authSubjectSection) 不能为空")
    private List<AuthSubjectSection> authSubjectSectionList;

    @ApiModelProperty(value = "用户校区 ids")
//    @Valid
//    @NotEmpty(message = "用户校区 ids (authRoleIds) 不能为空")
    private List<Long> baseSchoolIds;


    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getcPassword() {
        return cPassword;
    }

    public void setcPassword(String cPassword) {
        this.cPassword = cPassword;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<Long> getAuthRoleIds() {
        return authRoleIds;
    }

    public void setAuthRoleIds(List<Long> authRoleIds) {
        this.authRoleIds = authRoleIds;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getWorkStatus() {
        return workStatus;
    }

    public void setWorkStatus(Integer workStatus) {
        this.workStatus = workStatus;
    }

    public Integer getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(Integer jobStatus) {
        this.jobStatus = jobStatus;
    }

    public Integer getSchoolType() {
        return schoolType;
    }

    public void setSchoolType(Integer schoolType) {
        this.schoolType = schoolType;
    }

    public List<Long> getBaseSchoolIds() {
        return baseSchoolIds;
    }

    public void setBaseSchoolIds(List<Long> baseSchoolIds) {
        this.baseSchoolIds = baseSchoolIds;
    }

    public List<AuthSubjectSection> getAuthSubjectSectionList() {
        return authSubjectSectionList;
    }

    public void setAuthSubjectSectionList(List<AuthSubjectSection> authSubjectSectionList) {
        this.authSubjectSectionList = authSubjectSectionList;
    }
}
